package com.ruoyi.asset.service.impl;

import com.ruoyi.asset.domain.BackFiles;
import com.ruoyi.asset.mapper.BackFilesMapper;
import com.ruoyi.asset.service.IBackFilesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 文件基础Service业务层处理
 *
 * @author hghi
 * @date 2022-06-26
 */
@Service
public class BackFilesServiceImpl implements IBackFilesService {

    @Resource
    private BackFilesMapper backFilesMapper;

    /**
     * 查询文件基础
     *
     * @param fileId 文件基础主键
     * @return 文件基础
     */
    @Override
    public BackFiles selectBackFilesByFileId(Long fileId) {
        return backFilesMapper.selectBackFilesByFileId(fileId);
    }

    /**
     * 查询文件基础列表
     *
     * @param backFiles 文件基础
     * @return 文件基础
     */
    @Override
    public List<BackFiles> selectBackFilesList(BackFiles backFiles) {
        return backFilesMapper.selectBackFilesList(backFiles);
    }

    /**
     * 新增文件基础
     *
     * @param backFiles 文件基础
     * @return 结果
     */
    @Override
    public int insertBackFiles(BackFiles backFiles) {
        return backFilesMapper.insertBackFiles(backFiles);
    }

    /**
     * 修改文件基础
     *
     * @param backFiles 文件基础
     * @return 结果
     */
    @Override
    public int updateBackFiles(BackFiles backFiles) {
        return backFilesMapper.updateBackFiles(backFiles);
    }

    /**
     * 批量删除文件基础
     *
     * @param fileIds 需要删除的文件基础主键
     * @return 结果
     */
    @Override
    public int deleteBackFilesByFileIds(Long[] fileIds) {
        return backFilesMapper.deleteBackFilesByFileIds(fileIds);
    }

    /**
     * 删除文件基础信息
     *
     * @param fileId 文件基础主键
     * @return 结果
     */
    @Override
    public int deleteBackFilesByFileId(Long fileId) {
        return backFilesMapper.deleteBackFilesByFileId(fileId);
    }
}
